Skip to content

chore(proto): gate AIP lint in CI and fix buf.yaml accuracy - #431

Open
richardthe3rd wants to merge 1 commit into
mainfrom
claude/api-definitions-review-y8gtuc
Open

chore(proto): gate AIP lint in CI and fix buf.yaml accuracy#431
richardthe3rd wants to merge 1 commit into
mainfrom
claude/api-definitions-review-y8gtuc

Conversation

@richardthe3rd

@richardthe3rd richardthe3rd commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

Tooling fixes for the proto API contract, rebased onto current main (after #433 added the festival catalogue API and renamed the proto tree myfestival/festival/).

  1. AIP linter now gates CI (.github/workflows/ci.yml, mise.dev.toml)
    Added an api-linter step to the CI proto job with --set-exit-status so design-level regressions — the rules buf's STANDARD ruleset doesn't cover — actually fail the build. Added the same flag to the proto:api-lint mise task (it previously printed problems but exited 0, so it wasn't really a gate). Lints all 7 festival/v1alpha/ protos. Pinned buf (1.70.0) and api-linter (2.3.1) in both dev and CI so local and CI results agree.

  2. buf.yaml accuracy fixes

    • Corrected the lint-exception comment: Delete returns the DrinkEntry tombstone (soft delete, AIP-164), not google.protobuf.Empty.
    • Removed the now-dead ignore: google/protobuf/empty.proto breaking entry (nothing imports empty.proto).
    • Fixed the promotion-path comment to reference the real buf category WIRE_JSONWIRE_JSON_COMPATIBLE is not a valid category, so following the documented v1 plan as written would fail.

Note on breaking strategy

This PR originally proposed switching active breaking detection to WIRE_JSON now. After #433 adopted ignore_unstable_packages: true (alpha packages exempt from breaking checks, JSON-level checks deferred to v1), that strategy is left unchanged — it's the right call for a churning alpha API (it's what enabled the myfestival→festival rename). The only breaking-config change here is fixing the invalid category name in the forward-looking comment.

Verification

Run locally against the real binaries (caught two bugs before they reached CI: WIRE_JSON_COMPATIBLE isn't a valid buf category — it's WIRE_JSON; and go install of api-linter v2 needs the /v2 module path):

  • buf lint → exit 0
  • buf format --diff --exit-code → exit 0
  • buf breaking (config valid, WIRE + ignore_unstable_packages) → exit 0
  • api-linter --set-exit-statusproblems: [] for all 7 protos, exit 0

https://claude.ai/code/session_01MPdgVxaNBHJdL8hnyFGYpC

@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Cloudflare Pages Preview

Your preview deployment is ready!

Preview URL: https://claude-api-definitions-revie.staging-cambeerfestival.pages.dev

This preview will be automatically updated when you push new commits to this PR.

Add the AIP design linter (api-linter) to the CI proto job with
--set-exit-status so design-level regressions buf's STANDARD ruleset
doesn't cover actually gate merges; mirror the flag in the proto:api-lint
mise task. Pin buf (1.70.0) and api-linter (2.3.1) in dev and CI so local
and CI results agree.

Fix the stale buf.yaml lint comment (Delete returns the resource tombstone
per AIP-164, not google.protobuf.Empty) and drop the now-dead empty.proto
breaking-ignore entry. Correct the promotion-path comment to reference the
real buf category WIRE_JSON (WIRE_JSON_COMPATIBLE is not a valid category);
the WIRE + ignore_unstable_packages alpha strategy is left unchanged.
@richardthe3rd
richardthe3rd force-pushed the claude/api-definitions-review-y8gtuc branch from 0787340 to 065089e Compare June 15, 2026 08:09
@richardthe3rd richardthe3rd changed the title chore(proto): tighten breaking detection and gate AIP lint in CI chore(proto): gate AIP lint in CI and fix buf.yaml accuracy Jun 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Cloudflare Pages Preview

Your preview deployment is ready!

Preview URL: https://claude-api-definitions-revie.staging-cambeerfestival.pages.dev

This preview will be automatically updated when you push new commits to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants